
// lib
// config
// script & methods & public
// state
// http
// service
import {
  // simpleBooleanService,
  // simpleListService,
  simpleObjectService,
  simplePageService,
  simpleResService,
} from "public/service/simple.service";
import { API_ADD_OUT_RECORD_PAGE, API_ADD_RETURN_RECORD_PAGE, API_BORROW_PAGE, API_NEW_BORROW, API_NEW_ORDER, API_ORDER_CANCEL, API_ORDER_PAGE, API_OUT_RECORD_PAGE, API_REPORT_LOST, API_RETURN_RECORD_PAGE, ReqBorrowPage, ReqNewBorrow } from "./api";
// api
// interface
// 其它

// 借还管理-借阅分页列表
export async function getBorrowPageService(params: ReqBorrowPage) {
  return simplePageService<ReqBorrowPage, BorrowRecordDto>(
    API_BORROW_PAGE ,
    params,
  );
}

// 借还管理-新增借阅
export async function addBorrowService(params: ReqNewBorrow) {
  return simpleResService<ReqNewBorrow>(API_NEW_BORROW, params);
}
// 借还管理-报失
export async function reportLostService(params: ReqNewBorrow) {
  return simpleResService<ReqNewBorrow>(API_REPORT_LOST, params);
}
// 借还管理-取消预约
export async function cancelOrderService(params: ReqNewBorrow) {
  return simpleResService<ReqNewBorrow>(API_ORDER_CANCEL, params);
}

// 借还管理-预约记录分页列表
export async function getOrderPageService(params: ReqBorrowPage) {
  return simplePageService<ReqBorrowPage, OrderRecordDto>(API_ORDER_PAGE, params);
}
// 借还管理-新增预约
export async function addOrderService(params: ReqNewBorrow) {
  return simpleResService<ReqNewBorrow>(API_NEW_ORDER, params);
}

// 借还管理-出库单记录分页列表
export async function getOutRecordPageService(params: ReqBorrowPage) {
  return simplePageService<ReqBorrowPage, BorrowRecordDto>(API_OUT_RECORD_PAGE, params);
}
// 借还管理-新增预约
export async function confirmOutRecordService(params: ReqNewBorrow) {
  return simpleObjectService<ReqNewBorrow,BorrowRecordDto>(API_ADD_OUT_RECORD_PAGE, params);
}
// 借还管理-还书记录分页列表
export async function getReturnRecordPageService(params: ReqBorrowPage) {
  return simplePageService<ReqBorrowPage, BorrowRecordDto>(API_RETURN_RECORD_PAGE, params);
}
// 借还管理-新增还书
export async function confirmReturnRecordService(params: ReqNewBorrow) {
  return simpleObjectService<ReqNewBorrow,BorrowRecordDto>(API_ADD_RETURN_RECORD_PAGE, params);
}
// // 借还管理-提货
// export async function orderPickUpService(params: ReqOrderPickUp) {
//   return simpleBooleanService<ReqOrderPickUp>(API_ORDER_PICK_UP, params);
// }


